package com.ruoyi.project.dict.eryapage.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.dict.eryapage.domain.EryaPage;
import com.ruoyi.project.dict.eryapage.mapper.EryaPageMapper;
import com.ruoyi.project.dict.eryapage.service.IEryaPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 尔雅页面Service业务层处理
 *
 * @author shixiangwen
 * @date 2021-08-19
 */
@Service
@DataSource(DataSourceType.DICT)
public class EryaPageServiceImpl implements IEryaPageService {

    @Autowired
    private EryaPageMapper eryaPageMapper;

    /**
     * 查询尔雅页面
     *
     * @param id 尔雅页面ID
     * @return 尔雅页面
     */
    @Override
    public EryaPage selectEryaPageById(Long id) {
        return eryaPageMapper.selectEryaPageById(id);
    }

    /**
     * 查询尔雅页面列表
     *
     * @param eryaPage 尔雅页面
     * @return 尔雅页面
     */
    @Override
    public List<EryaPage> selectEryaPageList(EryaPage eryaPage) {
        return eryaPageMapper.selectEryaPageList(eryaPage);
    }

    /**
     * 新增尔雅页面
     *
     * @param eryaPage 尔雅页面
     * @return 结果
     */
    @Override
    public int insertEryaPage(EryaPage eryaPage) {
        return eryaPageMapper.insertEryaPage(eryaPage);
    }

    /**
     * 修改尔雅页面
     *
     * @param eryaPage 尔雅页面
     * @return 结果
     */
    @Override
    public int updateEryaPage(EryaPage eryaPage) {
        return eryaPageMapper.updateEryaPage(eryaPage);
    }

    /**
     * 删除尔雅页面对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEryaPageByIds(String ids) {
        return eryaPageMapper.deleteEryaPageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除尔雅页面信息
     *
     * @param id 尔雅页面ID
     * @return 结果
     */
    @Override
    public int deleteEryaPageById(Long id) {
        return eryaPageMapper.deleteEryaPageById(id);
    }
}
